package com.example.managemyself.data.database;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.example.managemyself.model.UserSettings;

@Dao
public interface UserSettingsDao {
    
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insertUserSettings(UserSettings settings);
    
    @Update
    void updateUserSettings(UserSettings settings);
    
    @Query("SELECT * FROM user_settings WHERE userId = :userId")
    LiveData<UserSettings> getUserSettingsByUserId(int userId);
    
    @Query("SELECT * FROM user_settings WHERE userId = :userId")
    UserSettings getUserSettingsByUserIdSync(int userId);
} 